<?php

use Illuminate\Database\Seeder;
use App\Models\User;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // 清空数据表先
        User::truncate();
        // 批量导入 数据工厂
        factory(User::class, 100)->create();
        // id为1 的用户名username 设置为admin
        User::where('id', 1)->update(['username' => config('rbac.super')]);
    }
}
